package main

import (
	"context"
	"log"
	"net"

	"github.com/go-redis/redis/v8"
)

func init() {
	rd = redis.NewClient(&redis.Options{
		Addr:     "localhost:6379",
		Password: "",
		DB:       1,
	})

	pong, err := rd.Ping(context.Background()).Result()
	if err != nil {
		panic(err)
	} else {
		log.Println("redis inited, ", pong)
	}

	conn, err = net.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4(127,0,0,1), Port: 10000})
	if err != nil {
		panic(err)
	}
}